<%@ Page Language="C#" MasterPageFile="~/MasterPage/Site.Master" AutoEventWireup="true"
    CodeBehind="ApplicationConfigurationList.aspx.cs" Inherits="OccurrencesWeb.Page.ApplicationConfigurationList" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>


<asp:Content ID="AdditionalPageHead" ContentPlaceHolderID="AdditionalJavascript" runat="server">
    <script type="text/javascript" src="../js/applicationConfigList.js"></script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <div id="DivHiddenControls" style="display: none;">
        <asp:TextBox ID="TextBoxInformationApplicationConfigId" runat="server"></asp:TextBox>
        <asp:Button ID="ButtonEdit" runat="server" OnClick="ButtonEdit_Click" />
        <asp:TextBox ID="TextBoxEditCommand" runat="server"></asp:TextBox>
    </div>
    <div id="DivRadControls">

        <telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
            runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="gvParameters">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gvParameters" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
            Width="75px" Transparency="20" BackColor="Black">
            <table style="width: 100%; height: 100%;">
                <tr style="height: 100%">
                    <td align="center" valign="middle" style="width: 100%">
                        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                            style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" />
                    </td>
                </tr>
            </table>
        </telerik:RadAjaxLoadingPanel>
    </div>
    <div id="body-content">
        <div id="body-content-title">
            <h2>
                <asp:Literal ID="ltrTitleMenuSelected" runat="server"></asp:Literal></h2>
            <h3>Application Configuration</h3>
        </div>
        <div class="frame">
            <div class="frame-body">
                <div>
                    <telerik:RadGrid AutoGenerateColumns="false" ID="gvParameters" OnNeedDataSource="OnParametersNeedDataSource"
                        Width="100%" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15"
                        ShowFooter="True" AllowPaging="True" runat="server" GridLines="None">
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                        <GroupingSettings CaseSensitive="false" />
                        <MasterTableView AutoGenerateColumns="false" HeaderStyle-CssClass="header-rad-columns" AllowFilteringByColumn="True" ShowFooter="false"
                            TableLayout="Fixed">
                            <Columns>
                                <telerik:GridBoundColumn DataField="Id" HeaderText="ID" ItemStyle-CssClass="value-column rad-columns" SortExpression="Id"
                                    UniqueName="Id" AllowFiltering="false" HeaderStyle-Width="40px">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Key" HeaderText="Key" FilterControlWidth="220px" ItemStyle-CssClass="value-column rad-columns" SortExpression="Key"
                                    UniqueName="Key" ItemStyle-Wrap="True" HeaderStyle-Wrap="True">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Value" HeaderText="Value" FilterControlWidth="220px" ItemStyle-CssClass="value-column rad-columns" SortExpression="Value"
                                    UniqueName="Value" ItemStyle-Wrap="True" HeaderStyle-Wrap="True" HtmlEncode="true">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" FilterControlWidth="220px" ItemStyle-CssClass="value-column rad-columns"
                                    SortExpression="Description" UniqueName="Description">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="Edit" ItemStyle-CssClass="value-column rad-columns" AllowFiltering="false">
                                    <ItemTemplate>
                                        <a href='/Configuration/Maintenance/<%# DataBinder.Eval(Container.DataItem, "Id") %>'>Edit</a>
                                    </ItemTemplate>
                                    <HeaderStyle Width="50px"></HeaderStyle>
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <SortExpressions>
                                <telerik:GridSortExpression FieldName="Id" SortOrder="Descending" />
                            </SortExpressions>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                            <Scrolling AllowScroll="false" />
                        </ClientSettings>
                    </telerik:RadGrid>
                    <br />
                </div>
            </div>
            <div class="frame-navigation">
                <div class="area-buttons">
                    <a href="/Configuration/Maintenance/" title="Add New User" class="bg-button-left">Add New</a>
                </div>
            </div>
        </div>
    </div>

</asp:Content>
